/*
 * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.ohos.hapsigntool.entity;

/**
 * Content digest algorithm
 *
 * @since 2021-12-13
 */
public enum ContentDigestAlgorithm {
    SHA256("SHA-256", 256 / 8),
    SHA384("SHA-384", 384 / 8),
    SHA512("SHA-512", 512 / 8);

    private String digestAlgorithm;

    private int digestOutputByteSize;

    ContentDigestAlgorithm(String digestAlgorithm, int digestOutputByteSize) {
        this.digestAlgorithm = digestAlgorithm;
        this.digestOutputByteSize = digestOutputByteSize;
    }

    public String getDigestAlgorithm() {
        return digestAlgorithm;
    }

    public int getDigestOutputByteSize() {
        return digestOutputByteSize;
    }
}
